<?php 
  require_once("../../includes/config.php"); 
                    if ($_SESSION['r']>2&&$_SESSION['r']!=4)
				  {
				  	  $_SESSION['error_message'] = "غير مسموح";
						redirect("index.php");
				  die();
				  }
  if(isset($_GET['id']))
  {
    $apartments = query('
          SELECT a.id AS apartment__id,a.* FROM apartments a
          WHERE a.id=?',$_GET['id']);
          
    $aprt = $apartments[0];
    renderWithoutHeader("Apartments/edit.php", array("aprt"=>$aprt,"cooler_type"=>$cooler_type));

  }  

?>